using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UwinEducation.Domain.Entities;

namespace UwinEducation.Domain.IRepositories
{
    /// <summary>
    /// 系统配置仓储接口
    /// </summary>
    public interface ISystemConfigRepository : IRepository<SystemConfig, Guid>
    {
        /// <summary>
        /// 根据键获取配置
        /// </summary>
        /// <param name="key">配置键</param>
        /// <returns>配置项</returns>
        Task<SystemConfig> GetByKeyAsync(string key);
        
        /// <summary>
        /// 根据键获取配置值
        /// </summary>
        /// <param name="key">配置键</param>
        /// <returns>配置值</returns>
        Task<string> GetValueByKeyAsync(string key);

        /// <summary>
        /// 更新配置值
        /// </summary>
        /// <param name="key">配置键</param>
        /// <param name="value">新配置值</param>
        /// <returns>是否成功</returns>
        Task<bool> UpdateValueAsync(string key, string value);

        /// <summary>
        /// 获取所有配置
        /// </summary>
        /// <returns>所有配置</returns>
        Task<IEnumerable<SystemConfig>> GetAllAsync();

    }
} 